﻿@model Consumer.Models.CourseEnrollmentModel


@using (Html.BeginForm("Enroll", "Course"))
{
    @Html.ValidationSummary(true)

    @Html.HiddenFor(model => model.CourseId)
    @Html.HiddenFor(model => model.Enrolled)
    @Html.HiddenFor(model => model.UserId)

    if (Model.Enrolled)
    {
        <text>You are enrolled in this course.<br /></text>
        <input type="submit" value="Unenroll" />
    }
    else
    {
        <text>You are not enrolled in this course.<br /></text>
        <input type="submit" value="Enroll" />
    }
}
